//
//  SLCommonsFacebookConnect.m
//  SecretRoom
//
//  Created by Sitdhibhong Laokok on 9/13/54 BE.
//  Copyright 2554 App Tree. All rights reserved.
//

#import "SLCommonsFacebookConnect.h"

@implementation SLCommonsFacebookConnect

@synthesize facebook;

- (id)init
{
    self = [super init];
    if (self) {
        // Initialization code here.
        facebook = [[Facebook alloc] initWithAppId:@"212635048797272" andDelegate:self];
    }
    
    return self;
}

- (void)fbDidLogin
{
    NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
    [userDefault setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"];
    [userDefault setObject:[facebook accessToken] forKey:@"FBExpirationDateKey"];
    
    [userDefault synchronize];

}

- (void)fbDidNotLogin:(BOOL)cancelled
{
    
}

- (void)fbDialogNotLogin:(BOOL)cancelled
{
    
}

- (void)fbDialogLogin:(NSString *)token expirationDate:(NSDate *)expirationDate
{
    
}



@end
